package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.WorkerCertificationAudit;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author:zhq
 * @Date: 2025/09/17 17:36
 * @Description:
 */
@RestController
@RequestMapping("/operation/worker-certification-audit")
public class OperateCertificationAuditController {

    @Resource
    private IWorkerCertificationAuditService workerCertificationAuditService;

    /**
     * 分页查询
     */
    @GetMapping("page")
    public PageResult<WorkerCertificationAudit> page(WorkerCertificationAuditPageQueryReqDTO workerCertificationAuditPageQueryReqDTO) {
        return workerCertificationAuditService.pageQuery(workerCertificationAuditPageQueryReqDTO);
    }


    /**
     * 审核认证
     */
    @PutMapping("/audit/{id}")
    public void auditCertification(@PathVariable("id") String id, CertificationAuditReqDTO certificationAuditReqDTO) {
        workerCertificationAuditService.auditCertification(id, certificationAuditReqDTO);
    }
}
